 <%@include file="/WEB-INF/common/taglibs.jsp" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<script>
$(document).ready(function(){
	$(".cancel-btn").click(function(e){
			e.preventDefault();
			$("#cancelDiv").modal("show");
		
	});
	
	$(".cancel-submit").click(function(){
		$(this).parents("form:first").submit();
	});
	
	
	
});


</script>


<div class="row-fluid">
   <div class="span4">

      <div class="box" >
    	 <input type="hidden" name="id" value="${facilityBooking.id}" />
           <div class="title">
            <h4 class="clearfix">
               <span class="box-form left">
   	            	<form action="${ctx}/admin/facility-booking/${facilityBooking.id}/confirm/" method="post">
               		<button class="btn btn-success btn-mini" type="submit">Confirm</button>
            		</form>
               </span>
               <span class="box-form right">
                        <button class="btn btn-info btn-mini" type="button" onClick="javascript:window.location='/admin/facility-booking/list/'">Back</button>
               </span>
               <span class="box-form right">
               <form action="${ctx}/admin/facility-booking/${facilityBooking.id}/cancel/" method="post">
              		<button class="btn btn-danger btn-mini cancel-btn  " type="submit"  >Cancel</button>
              	</form>
               </span>
            </h4>
         </div>
         <div class="content form-horizontal clearfix">
		   <div class="form-row">
               <label class="form-label span4">Day </label>
               <input class="span8" name="title" type="text" readonly="readonly" value="<fmt:formatDate pattern="yyyy-MM-dd" value="${facilityBooking.day}" />" />
            </div>
             <div class="form-row row-fluid">
               <label class="form-label span4">Session </label>
               <input class="span8" name="metaKeywords" type="text" readonly="readonly" value="${facilityBooking.bookingSession.fromTo}" />
            </div>
            
            <div class="form-row row-fluid">
               <label class="form-label span4">Facility</label>
               <input class="span8" name="metaTitle" type="text" readonly="readonly" value="${facilityBooking.facility.name}" />
            </div>
            
            
            <div class="form-row row-fluid">
               <label class="form-label span4">Resident</label>
               <input class="span8" name="metaTitle" type="text" readonly="readonly" value="${facilityBooking.member.userName}" />
            </div>
             <div class="form-row row-fluid">
               <label class="form-label span4">Unit Number</label>
               <input class="span8" name="metaTitle" type="text" readonly="readonly" value="${facilityBooking.member.unitNumber}" />
            </div>
            
            <div class="form-row row-fluid">
               <label class="form-label span4">Status</label>
               <input class="span8" name="metaDescription" type="text"  readonly="readonly" value="${facilityBooking.status}" />
            </div>
         <!--remark --> <div class="form-row row-fluid"> <label class="form-label span4">Remark : :</label> <textarea name="remark" class="span8 limit elastic" id="remark" rows="3" cols="10">${facilityBooking.remark}</textarea></div>
            
         </div>
      </div>
   </div>
</div>
<div id="cancelDiv" class="modal   fade"
	selector=".mcCloseDayTable">
	<div class="modal-header">
		<button type="button" class="close" data-dismiss="modal">
			<span class="icon12 minia-icon-close"></span>
		</button>
		<h3>Cancel</h3>
	</div>
	<form action="${ctx}/admin/facility-booking/${facilityBooking.id}/cancel/" method="post">
		<div class="modal-body">
			<input type="hidden" name="action">
			<div class="form-row row-fluid">
				<div class="span12">
            <!--remark --> <div class="form-row row-fluid"> <label class="form-label span4">Remark : :</label> <textarea name="remark" class="span8 limit elastic" id="remark" rows="3" cols="10">${facilityBooking.remark}</textarea></div>
				</div>
			</div>
		</div>
		<div class="modal-footer">
			<a href="#" class="btn" data-dismiss="modal">Close</a> <a href="#"
				class="btn btn-primary cancel-submit">Save changes</a>
		</div>
	</form>

</div>
